package com.view.test;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;


import com.view.test.activity.ChannelManagerActivity;
import com.view.test.activity.LineChartActivity;
import com.view.test.view.LineChartView;

public class MainActivity extends AppCompatActivity {



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        findViewById(R.id.line_chart).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, LineChartActivity.class));
            }
        });


        findViewById(R.id.channel_manager).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(MainActivity.this, ChannelManagerActivity.class));

            }
        });

        findViewById(R.id.channel_manager).setOnLongClickListener(new View.OnLongClickListener() {
            @Override
            public boolean onLongClick(View v) {
                Log.i("ItemTouchHelper","长按");
                return false;
            }
        });

        findViewById(R.id.channel_manager).setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                Log.i("ItemTouchHelper",event.getAction()+"");
                return false;
            }
        });

    }
}
